package com.jt.system.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jt.system.dao.UserMapper;
import com.jt.system.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class UserServicelmpl implements UserService{

    @Autowired
    private UserMapper userMapper;

    @Override
    public User selectUserByUsername(String username) {

//        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
//        queryWrapper.eq("username", username);
//        return  userMapper.selectOne(queryWrapper);

        return userMapper.selectUserByUsername(username);

    }

    @Override
    public List<String> SelectUserPermissions(Long userId) {

        return userMapper.SelectUserPermissions(userId);

    }

}
